#ifndef __EI_MAI_SMART_LPD_H__
#define __EI_MAI_SMART_LPD_H__

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif


typedef struct eiMADP_SMART_LPD_RESULT_S {
	EI_S32 s32Rect[4]; //objs rect
	// EI_S32 s32Area;
	EI_U64 u64Timestamp;
	EI_S32 s32Class;
	EI_S32 s32ID;
	EI_FLOAT f32Score;
	EI_FLOAT f32Kpts[8];
} EI_MADP_SMART_LPD_RESULT_S;


typedef struct eiMADP_SMART_LPD_RESULTS_S {
	EI_U32 u32Num;
	EI_U32 u32FrameWidth;
	EI_U32 u32FrameHeight;
	EI_S32 s32FrameId;
	EI_MADP_SMART_LPD_RESULT_S stLicplate[DEFAULT_NNA_LICPLATE_DET_CONFIG_MAX_DET_CNT];
	//for nna
	EI_U32 NnaHandle;
	EI_NNA_DST_LPD_S stNnaResult;
} EI_MADP_SMART_LPD_RESULTS_S;

typedef struct eiMADP_SMART_LPD_VENC_DATA_S {
	EI_VOID *pVStreamData;
	EI_U8 *pu8Addr;
	EI_U32 au32Len;
} EI_MADP_SMART_LPD_VENC_DATA_S;

typedef struct eiMADP_SMART_LPD_CAP_RESULTS_S {
	EI_MADP_SMART_LPD_RESULTS_S *pstLpdResult;
	// cap frame image
	EI_MADP_SMART_FRAME_S *pstSmartFrame;
} EI_MADP_SMART_LPD_CAP_RESULTS_S;

typedef struct eiMADP_SMART_LPD_VENC_RESULT_S {
	EI_MADP_SMART_LPD_CAP_RESULTS_S *pstSmartCapResults;

	EI_S32 s32FrameId;
	EI_U64 u64Timestamp;
} EI_MADP_SMART_LPD_VENC_RESULT_S;


typedef struct eiMADP_SMART_LPD_SNAP_RESULT_S {
	EI_MADP_SMART_LPD_VENC_RESULT_S *pstLpdVencResultData;
	EI_MADP_SMART_LPD_VENC_DATA_S *pstBgVencData;
} EI_MADP_SMART_LPD_SNAP_RESULT_S;

//用户回调接收识别结果
typedef EI_S32 (*EI_MADP_SMART_LPD_DATA_CB)
	(EI_HANDLE hLpdCap, EI_MADP_SMART_FRAME_S *pstSmartFrame,
	EI_MADP_SMART_LPD_RESULTS_S *pstDetResults, EI_VOID *pPrivData);

//用户回调接收抓拍
typedef EI_S32 (*EI_MADP_SMART_LPD_SnapDataCB)(EI_HANDLE hLpdCap,
	EI_MADP_SMART_LPD_SNAP_RESULT_S *pstSmartLpdSnapResults, EI_VOID *pPrivData);

/** the attribute of smart motion det*/
typedef struct eiMADP_SMART_LPD_CFG_S {
	EI_BOOL bLpdEnable;
	EI_BOOL bLpdDrawBoxEnable;//画框开关
	EI_S32 s32CapMode;//抓拍模式
	EI_S32 s32CapInterval;//抓拍时间戳
	EI_S32 s32CapJpegQuality;
	EI_U32 u32FrameWidth;
	EI_U32 u32FrameHeight;

	EI_S32 s32Sensitive;
	EI_MADP_SMART_LPD_SnapDataCB pfnCapDataCB;
	EI_MADP_SMART_LPD_DATA_CB pfnDataCB;
	EI_VOID *pPrivateData;
} EI_MADP_SMART_LPD_CFG_S;

/** the attribute of smart mbgs cap*/
typedef struct eiMADP_SMART_LPD_ATTR_S {
	/* init attr start*/
	EI_HANDLE Vproc;
	EI_HANDLE Vport;
	EI_HANDLE VencChn;
	EI_HANDLE Det;

	EI_MADP_SMART_LPD_CFG_S smartLpdCfg;
	EI_NNA_LPD_CONFIG_S stConfig;
} EI_MADP_SMART_LPD_ATTR_S;



#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif

#endif /* __EI_MAI_SMART_CAR_H__ */

